//
//  TemporalDomainCompression.cpp
//  
//
//  Created by Kun Zhao on 13/02/20.
//  Copyright (c) 2013 Kyoto University. All rights reserved.
//

#include <iostream>
#include "TemporalDomainCompression.h"

namespace kun 
{
    TemporalDomainCompression::TemporalDomainCompression() {}
    
    TemporalDomainCompression::TemporalDomainCompression(kun::SDC* object_prev, kun::SDC* object_curr, float tolerance)
    {
        this->compression( object_prev, object_curr, float tolerance );
    }
    
    kun::TDC* TemporalDomainCompression::compression( kun::SDC* object_prev, kun::SDC* object_curr, float tolerance )
    {
        object_prev->updateMinMaxValues();
        object_curr->updateMinMaxValues();
        value1 = object_prev->values().pointer();
        value2 = object_curr->values().pointer();
        range = (float)( object_prev->maxValue() - object_prev->minValue() );
        NumberOfVertices = object_prev->nnodes();
        float toleranceError = range * tolerance;
    }
    
}
